package com.gxgeek.javabasic.base.valuepassed;

/**
 * Created by gx on 2017/7/10.
 */
public final class TestFinal {

    int a ;

    public TestFinal(int a) {
        this.a = a;
    }

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }

    public static void main(String[] args) {
        TestFinal tf  = new TestFinal(1);
        System.out.println(tf.getA());
        change(tf);

        System.out.println(tf.getA());
        tf=null;
        System.out.println(tf);

    }

    private static void change(TestFinal tf) {

       tf.setA(5);
        tf=null;
    }
}
